<?php
namespace Home\Controller;
use Think\Controller;
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';

class IndexController extends Controller {
    public function index(){
		$user_name = session('user_name');
		$this->assign('user_name',$user_name);
        $this->display();
    }

    public function logout()
	{
		session('user_id',null);
        session('user_name',null);
        
		$this->error('注销登录！',U('Index/index'),3);
	}
}